<div class="comments">
    {% for comment in comments %}
    <div class="comment panel panel-default">
        <div class="panel-heading">
            <span class="comment-thumbail img-circle"></span>
            <a href="{{ url_for('main.user', username=comment.author.username) }}">
                <img class="img-rounded profile-thumbail" src="{{ comment.author.gravatar(16) }}">
            </a>
            <span class="comment-author">
                <a href="{{ url_for('main.user', username=comment.author.username) }}">
                    {{ comment.author.username }}
                </a>
            </span>
            <span class="pull-right">
                <span class="comment-date lable label-default">{{ moment(comment.timestamp).fromNow() }}</span>
                <span class="label label-default">评论</span>
            </span>
    </div>
        <div class="panel-body">
            <div class="comment-body">
                {% if comment.disabled %}
                <p><i>该条评论给已经被协管员禁止了</i></p>
                {% endif %}
                 {% if moderate or not comment.disabled %}
                  {% if comment.body_html %}
                     {{ comment.body_html|safe }}
                  {% else %}
                      {{ comment.body }}
                  {% endif %}
            {% endif %}
            </div>
            {% if moderate %}
                <br>
                {% if comment.disabled %}
                  <a class="btn btn-default btn-xs"
                     href="{{ url_for('main.moderate_enable', id=comment.id, page=page) }}">
                      Enable
                  </a>
                {% else %}
                  <a class="btn btn-default btn-xs"
                  href="{{ url_for('main.moderate_disable', id=comment.id, page=page) }}">
                      Disable
                  </a>
            {% endif %}
            {% endif %}

        </div>
    </div>
{% endfor %}
</div>